#pragma once
#include "ImageFwd.h"
#include "IImageLoader.h"
#include "ImportExport.h"

namespace ja2{ namespace sgp
{
	class IImageLoader;

	//! Image manager.
	class ImageManager : boost::noncopyable
	{
		// Constants
	private:
		//! PCX extension.
		static std::string const PCX;
		//! STCI extension.
		static std::string const STCI;

		// Enums
	public:
		//! Loading flag.
		enum LoadingType
		{
			LT_ALL_DATA = 1
		};

		// Typedefs
	private:
		//! Map of image loaders.
		typedef std::unordered_map<std::string, std::unique_ptr<IImageLoader>> ImageLoaderMap_t;

		// Attributes
	private:
		//! Image loader map.
		ImageLoaderMap_t m_ImageLoaderMap;

		// Operations
	public:
		//! Load image.
		JA2_SGP_API ImagePtr_t load_image(boost::filesystem::path const &FileName, std::uint_least16_t Flags = LT_ALL_DATA);

		// Construction/Destruction
	public:
		JA2_SGP_API ImageManager();
	};
} /*sgp*/} /*ja2*/
